package model

import "time"

// 本表为评论表,和视频表和用户表有关系
// 评论
type Comment struct {
	Id         int64     `json:"id,omitempty" gorm:"primaryKey;not null;autoIncrement"`
	User       User      `json:"user" gorm:"foreignKey:Id;references:UserId;not null"`
	UserId     int64     `json:"user_id" gorm:"not null"`
	Video      Video     `json:"video" gorm:"foreignKey:Id;references:VideoId;not null"`
	VideoId    int64     `json:"video_id" gorm:"not null"`
	Content    string    `json:"content,omitempty" gorm:"size:512;not null"`
	CreateDate time.Time `json:"create_date,omitempty" gorm:"size:64"`
}
